package icu.groot.alan.hotel.controller.slideshow;

import icu.groot.alan.hotel.entity.vo.SlideshowVo;
import icu.groot.alan.hotel.service.SlideshowService;
import icu.groot.alan.hotel.util.GrootApi;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * Slideshow Management
 */
@RestController
@RequestMapping("/slideshow")
public class SlideshowController {

    @Resource
    SlideshowService slideshowService;

    @ApiOperation("Get All Slideshow")
    @GetMapping("/list")
    public List<SlideshowVo> list(){
        return GrootApi.BeanCopy.convertListTo(slideshowService.list(), SlideshowVo::new);
    }

}
